import request from '@/utils/request'

// 查询产品包材列表
export function listPackaging(query) {
  return request({
    url: '/product/packaging/list',
    method: 'get',
    params: query
  })
}

// 查询产品包材详细
export function getPackaging(id) {
  return request({
    url: '/product/packaging/' + id,
    method: 'get'
  })
}

// 新增产品包材
export function addPackaging(data) {
  return request({
    url: '/product/packaging',
    method: 'post',
    data: data
  })
}

// 修改产品包材
export function updatePackaging(data) {
  return request({
    url: '/product/packaging',
    method: 'put',
    data: data
  })
}

// 删除产品包材
export function delPackaging(id) {
  return request({
    url: '/product/packaging/' + id,
    method: 'delete'
  })
}
